package cn.bonoon.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.Table;

import cn.bonoon.kernel.support.entities.BaseEntity;
import cn.bonoon.kernel.support.entities.EntityOwner;
import cn.bonoon.kernel.support.entities.EntityRecyclable;
import cn.bonoon.kernel.support.entities.EntityStatus;

/**
 * 用来限定用户的可访问数据的范围
 * 如：某个企业下的员工，只允许操作本企业下的数据
 * 
 * 但这里会涉及到上下级数据范围的问题，如：母公司如何访问子公司等
 * 
 * @author jackson
 *
 */
@Entity
@Table(name = "t_owner")
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
public class OwnerEntity extends BaseEntity implements EntityRecyclable, EntityStatus, EntityOwner {

	private static final long serialVersionUID = 5444608310617534804L;

	/** 1:正常 -1:禁止 0:草稿 */
	@Column(name = "C_STATUS")
	private int status;

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

}
